Integrand size = 21, antiderivative size = 101 \[ \int \frac {\cos (e+f x)}{\left (a+b \sec ^2(e+f x)\right )^2} \, dx=-\frac {b (4 a+3 b) \text {arctanh}\left (\frac {\sqrt {a} \sin (e+f x)}{\sqrt {a+b}}\right )}{2 a^{5/2} (a+b)^{3/2} f}+\frac {\sin (e+f x)}{a^2 f}+\frac {b^2 \sin (e+f x)}{2 a^2 (a+b) f \left (a+b-a \sin ^2(e+f x)\right )} \]
-1/2*b*(4*a+3*b)*arctanh(sin(f*x+e)*a^(1/2)/(a+b)^(1/2))/a^(5/2)/(a+b)^(3/ 2)/f+sin(f*x+e)/a^2/f+1/2*b^2*sin(f*x+e)/a^2/(a+b)/f/(a+b-a*sin(f*x+e)^2)
Time = 0.45 (sec) , antiderivative size = 89, normalized size of antiderivative = 0.88 \[ \int \frac {\cos (e+f x)}{\left (a+b \sec ^2(e+f x)\right )^2} \, dx=\frac {-\frac {b (4 a+3 b) \text {arctanh}\left (\frac {\sqrt {a} \sin (e+f x)}{\sqrt {a+b}}\right )}{(a+b)^{3/2}}+\sqrt {a} \sin (e+f x) \left (2+\frac {b^2}{(a+b) \left (a+b-a \sin ^2(e+f x)\right )}\right )}{2 a^{5/2} f} \]
(-((b*(4*a + 3*b)*ArcTanh[(Sqrt[a]*Sin[e + f*x])/Sqrt[a + b]])/(a + b)^(3/ 2)) + Sqrt[a]*Sin[e + f*x]*(2 + b^2/((a + b)*(a + b - a*Sin[e + f*x]^2)))) /(2*a^(5/2)*f)
Time = 0.30 (sec) , antiderivative size = 96, normalized size of antiderivative = 0.95, number of steps used = 5, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.190, Rules used = {3042, 4635, 300, 2009}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \frac {\cos (e+f x)}{\left (a+b \sec ^2(e+f x)\right )^2} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {1}{\sec (e+f x) \left (a+b \sec (e+f x)^2\right )^2}dx\) |
\(\Big \downarrow \) 4635 |
\(\displaystyle \frac {\int \frac {\left (1-\sin ^2(e+f x)\right )^2}{\left (-a \sin ^2(e+f x)+a+b\right )^2}d\sin (e+f x)}{f}\) |
\(\Big \downarrow \) 300 |
\(\displaystyle \frac {\int \left (\frac {1}{a^2}-\frac {b (2 a+b)-2 a b \sin ^2(e+f x)}{a^2 \left (-a \sin ^2(e+f x)+a+b\right )^2}\right )d\sin (e+f x)}{f}\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \frac {-\frac {b (4 a+3 b) \text {arctanh}\left (\frac {\sqrt {a} \sin (e+f x)}{\sqrt {a+b}}\right )}{2 a^{5/2} (a+b)^{3/2}}+\frac {b^2 \sin (e+f x)}{2 a^2 (a+b) \left (-a \sin ^2(e+f x)+a+b\right )}+\frac {\sin (e+f x)}{a^2}}{f}\) |
(-1/2*(b*(4*a + 3*b)*ArcTanh[(Sqrt[a]*Sin[e + f*x])/Sqrt[a + b]])/(a^(5/2) *(a + b)^(3/2)) + Sin[e + f*x]/a^2 + (b^2*Sin[e + f*x])/(2*a^2*(a + b)*(a + b - a*Sin[e + f*x]^2)))/f
3.2.96.3.1 Defintions of rubi rules used
Int[((a_) + (b_.)*(x_)^2)^(p_)*((c_) + (d_.)*(x_)^2)^(q_), x_Symbol] :> Int [PolynomialDivide[(a + b*x^2)^p, (c + d*x^2)^(-q), x], x] /; FreeQ[{a, b, c , d}, x] && NeQ[b*c - a*d, 0] && IGtQ[p, 0] && ILtQ[q, 0] && GeQ[p, -q]
Int[sec[(e_.) + (f_.)*(x_)]^(m_.)*((a_) + (b_.)*sec[(e_.) + (f_.)*(x_)]^(n_ ))^(p_), x_Symbol] :> With[{ff = FreeFactors[Sin[e + f*x], x]}, Simp[ff/f Subst[Int[ExpandToSum[b + a*(1 - ff^2*x^2)^(n/2), x]^p/(1 - ff^2*x^2)^((m + n*p + 1)/2), x], x, Sin[e + f*x]/ff], x]] /; FreeQ[{a, b, e, f}, x] && In tegerQ[(m - 1)/2] && IntegerQ[n/2] && IntegerQ[p]
Time = 1.28 (sec) , antiderivative size = 92, normalized size of antiderivative = 0.91
method | result | size |
derivativedivides | \(\frac {\frac {\sin \left (f x +e \right )}{a^{2}}+\frac {b \left (-\frac {b \sin \left (f x +e \right )}{2 \left (a +b \right ) \left (a \sin \left (f x +e \right )^{2}-a -b \right )}-\frac {\left (4 a +3 b \right ) \operatorname {arctanh}\left (\frac {a \sin \left (f x +e \right )}{\sqrt {a \left (a +b \right )}}\right )}{2 \left (a +b \right ) \sqrt {a \left (a +b \right )}}\right )}{a^{2}}}{f}\) | \(92\) |
default | \(\frac {\frac {\sin \left (f x +e \right )}{a^{2}}+\frac {b \left (-\frac {b \sin \left (f x +e \right )}{2 \left (a +b \right ) \left (a \sin \left (f x +e \right )^{2}-a -b \right )}-\frac {\left (4 a +3 b \right ) \operatorname {arctanh}\left (\frac {a \sin \left (f x +e \right )}{\sqrt {a \left (a +b \right )}}\right )}{2 \left (a +b \right ) \sqrt {a \left (a +b \right )}}\right )}{a^{2}}}{f}\) | \(92\) |
risch | \(-\frac {i {\mathrm e}^{i \left (f x +e \right )}}{2 a^{2} f}+\frac {i {\mathrm e}^{-i \left (f x +e \right )}}{2 a^{2} f}-\frac {i b^{2} \left ({\mathrm e}^{3 i \left (f x +e \right )}-{\mathrm e}^{i \left (f x +e \right )}\right )}{a^{2} \left (a +b \right ) f \left (a \,{\mathrm e}^{4 i \left (f x +e \right )}+2 a \,{\mathrm e}^{2 i \left (f x +e \right )}+4 b \,{\mathrm e}^{2 i \left (f x +e \right )}+a \right )}+\frac {\ln \left ({\mathrm e}^{2 i \left (f x +e \right )}-\frac {2 i \left (a +b \right ) {\mathrm e}^{i \left (f x +e \right )}}{\sqrt {a^{2}+a b}}-1\right ) b}{\sqrt {a^{2}+a b}\, \left (a +b \right ) f a}+\frac {3 b^{2} \ln \left ({\mathrm e}^{2 i \left (f x +e \right )}-\frac {2 i \left (a +b \right ) {\mathrm e}^{i \left (f x +e \right )}}{\sqrt {a^{2}+a b}}-1\right )}{4 \sqrt {a^{2}+a b}\, \left (a +b \right ) f \,a^{2}}-\frac {\ln \left ({\mathrm e}^{2 i \left (f x +e \right )}+\frac {2 i \left (a +b \right ) {\mathrm e}^{i \left (f x +e \right )}}{\sqrt {a^{2}+a b}}-1\right ) b}{\sqrt {a^{2}+a b}\, \left (a +b \right ) f a}-\frac {3 b^{2} \ln \left ({\mathrm e}^{2 i \left (f x +e \right )}+\frac {2 i \left (a +b \right ) {\mathrm e}^{i \left (f x +e \right )}}{\sqrt {a^{2}+a b}}-1\right )}{4 \sqrt {a^{2}+a b}\, \left (a +b \right ) f \,a^{2}}\) | \(354\) |
1/f*(sin(f*x+e)/a^2+1/a^2*b*(-1/2/(a+b)*b*sin(f*x+e)/(a*sin(f*x+e)^2-a-b)- 1/2*(4*a+3*b)/(a+b)/(a*(a+b))^(1/2)*arctanh(a*sin(f*x+e)/(a*(a+b))^(1/2))) )
Time = 0.28 (sec) , antiderivative size = 391, normalized size of antiderivative = 3.87 \[ \int \frac {\cos (e+f x)}{\left (a+b \sec ^2(e+f x)\right )^2} \, dx=\left [\frac {{\left (4 \, a b^{2} + 3 \, b^{3} + {\left (4 \, a^{2} b + 3 \, a b^{2}\right )} \cos \left (f x + e\right )^{2}\right )} \sqrt {a^{2} + a b} \log \left (-\frac {a \cos \left (f x + e\right )^{2} + 2 \, \sqrt {a^{2} + a b} \sin \left (f x + e\right ) - 2 \, a - b}{a \cos \left (f x + e\right )^{2} + b}\right ) + 2 \, {\left (2 \, a^{3} b + 5 \, a^{2} b^{2} + 3 \, a b^{3} + 2 \, {\left (a^{4} + 2 \, a^{3} b + a^{2} b^{2}\right )} \cos \left (f x + e\right )^{2}\right )} \sin \left (f x + e\right )}{4 \, {\left ({\left (a^{6} + 2 \, a^{5} b + a^{4} b^{2}\right )} f \cos \left (f x + e\right )^{2} + {\left (a^{5} b + 2 \, a^{4} b^{2} + a^{3} b^{3}\right )} f\right )}}, \frac {{\left (4 \, a b^{2} + 3 \, b^{3} + {\left (4 \, a^{2} b + 3 \, a b^{2}\right )} \cos \left (f x + e\right )^{2}\right )} \sqrt {-a^{2} - a b} \arctan \left (\frac {\sqrt {-a^{2} - a b} \sin \left (f x + e\right )}{a + b}\right ) + {\left (2 \, a^{3} b + 5 \, a^{2} b^{2} + 3 \, a b^{3} + 2 \, {\left (a^{4} + 2 \, a^{3} b + a^{2} b^{2}\right )} \cos \left (f x + e\right )^{2}\right )} \sin \left (f x + e\right )}{2 \, {\left ({\left (a^{6} + 2 \, a^{5} b + a^{4} b^{2}\right )} f \cos \left (f x + e\right )^{2} + {\left (a^{5} b + 2 \, a^{4} b^{2} + a^{3} b^{3}\right )} f\right )}}\right ] \]
[1/4*((4*a*b^2 + 3*b^3 + (4*a^2*b + 3*a*b^2)*cos(f*x + e)^2)*sqrt(a^2 + a* b)*log(-(a*cos(f*x + e)^2 + 2*sqrt(a^2 + a*b)*sin(f*x + e) - 2*a - b)/(a*c os(f*x + e)^2 + b)) + 2*(2*a^3*b + 5*a^2*b^2 + 3*a*b^3 + 2*(a^4 + 2*a^3*b + a^2*b^2)*cos(f*x + e)^2)*sin(f*x + e))/((a^6 + 2*a^5*b + a^4*b^2)*f*cos( f*x + e)^2 + (a^5*b + 2*a^4*b^2 + a^3*b^3)*f), 1/2*((4*a*b^2 + 3*b^3 + (4* a^2*b + 3*a*b^2)*cos(f*x + e)^2)*sqrt(-a^2 - a*b)*arctan(sqrt(-a^2 - a*b)* sin(f*x + e)/(a + b)) + (2*a^3*b + 5*a^2*b^2 + 3*a*b^3 + 2*(a^4 + 2*a^3*b + a^2*b^2)*cos(f*x + e)^2)*sin(f*x + e))/((a^6 + 2*a^5*b + a^4*b^2)*f*cos( f*x + e)^2 + (a^5*b + 2*a^4*b^2 + a^3*b^3)*f)]
\[ \int \frac {\cos (e+f x)}{\left (a+b \sec ^2(e+f x)\right )^2} \, dx=\int \frac {\cos {\left (e + f x \right )}}{\left (a + b \sec ^{2}{\left (e + f x \right )}\right )^{2}}\, dx \]
Time = 0.27 (sec) , antiderivative size = 133, normalized size of antiderivative = 1.32 \[ \int \frac {\cos (e+f x)}{\left (a+b \sec ^2(e+f x)\right )^2} \, dx=\frac {\frac {2 \, b^{2} \sin \left (f x + e\right )}{a^{4} + 2 \, a^{3} b + a^{2} b^{2} - {\left (a^{4} + a^{3} b\right )} \sin \left (f x + e\right )^{2}} + \frac {{\left (4 \, a b + 3 \, b^{2}\right )} \log \left (\frac {a \sin \left (f x + e\right ) - \sqrt {{\left (a + b\right )} a}}{a \sin \left (f x + e\right ) + \sqrt {{\left (a + b\right )} a}}\right )}{{\left (a^{3} + a^{2} b\right )} \sqrt {{\left (a + b\right )} a}} + \frac {4 \, \sin \left (f x + e\right )}{a^{2}}}{4 \, f} \]
1/4*(2*b^2*sin(f*x + e)/(a^4 + 2*a^3*b + a^2*b^2 - (a^4 + a^3*b)*sin(f*x + e)^2) + (4*a*b + 3*b^2)*log((a*sin(f*x + e) - sqrt((a + b)*a))/(a*sin(f*x + e) + sqrt((a + b)*a)))/((a^3 + a^2*b)*sqrt((a + b)*a)) + 4*sin(f*x + e) /a^2)/f
Time = 0.30 (sec) , antiderivative size = 113, normalized size of antiderivative = 1.12 \[ \int \frac {\cos (e+f x)}{\left (a+b \sec ^2(e+f x)\right )^2} \, dx=-\frac {\frac {b^{2} \sin \left (f x + e\right )}{{\left (a^{3} + a^{2} b\right )} {\left (a \sin \left (f x + e\right )^{2} - a - b\right )}} - \frac {{\left (4 \, a b + 3 \, b^{2}\right )} \arctan \left (\frac {a \sin \left (f x + e\right )}{\sqrt {-a^{2} - a b}}\right )}{{\left (a^{3} + a^{2} b\right )} \sqrt {-a^{2} - a b}} - \frac {2 \, \sin \left (f x + e\right )}{a^{2}}}{2 \, f} \]
-1/2*(b^2*sin(f*x + e)/((a^3 + a^2*b)*(a*sin(f*x + e)^2 - a - b)) - (4*a*b + 3*b^2)*arctan(a*sin(f*x + e)/sqrt(-a^2 - a*b))/((a^3 + a^2*b)*sqrt(-a^2 - a*b)) - 2*sin(f*x + e)/a^2)/f
Time = 0.25 (sec) , antiderivative size = 94, normalized size of antiderivative = 0.93 \[ \int \frac {\cos (e+f x)}{\left (a+b \sec ^2(e+f x)\right )^2} \, dx=\frac {\sin \left (e+f\,x\right )}{a^2\,f}+\frac {b^2\,\sin \left (e+f\,x\right )}{2\,f\,\left (a+b\right )\,\left (-a^3\,{\sin \left (e+f\,x\right )}^2+a^3+b\,a^2\right )}-\frac {b\,\mathrm {atanh}\left (\frac {\sqrt {a}\,\sin \left (e+f\,x\right )}{\sqrt {a+b}}\right )\,\left (4\,a+3\,b\right )}{2\,a^{5/2}\,f\,{\left (a+b\right )}^{3/2}} \]